<%--
 - Copyright (c) 2009-2011 ETCORE Labs. All rights reserved. 
 - 
 - This software is the confidential and proprietary information of ETCORE Labs. 
 - You shall not disclose such confidential information and shall use it only
 - in accordance with the terms of the license agreement you entered into
 - with ETCORE Labs.
 -
 - Support can be obtained from support forums at:
 - http://www.etcore.com/
 -
 - @author: ETCORE GroupTalk developers
 -
 --%>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/taglibs/core" prefix="c"%>
<%@ taglib uri="http://www.etcore.com/grouptalk" prefix="grouptalk"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><c:out value="${context.title }" /></title>
<link rel="stylesheet" href="/group/css/styles.css" type="text/css">
<script>
function showHottestMsgs(days){
//var hottest1=document.getElementById('1');		
var hottest7=document.getElementById('7');	
var hottest31=document.getElementById('31');	
//var hottest365=document.getElementById('365');
//var hottestMsgs1=document.getElementById('hottestMsgs1');
var hottestMsgs7=document.getElementById('hottestMsgs7');	
var hottestMsgs31=document.getElementById('hottestMsgs31');
//var hottestMsgs365=document.getElementById('hottestMsgs365');	

if(days==1){
	//hottestMsgs1.style.display="";
	hottestMsgs7.style.display="none";	
	hottestMsgs31.style.display="none";
	//hottestMsgs365.style.display="none";


	//hottest1.style.color="red";
	hottest7.style.color="#999999";	
	hottest31.style.color="#999999";
	//hottest365.style.color="#999999";
}
else if(days==7){
	//hottestMsgs1.style.display="none";
	hottestMsgs7.style.display="";	
	hottestMsgs31.style.display="none";
	//hottestMsgs365.style.display="none";
	
	//hottest1.style.color="#999999";
	hottest7.style.color="red";	
	hottest31.style.color="#999999";
	//hottest365.style.color="#999999";

}else if (days==31){
	//hottestMsgs1.style.display="none";
	hottestMsgs7.style.display="none";	
	hottestMsgs31.style.display="";
	//hottestMsgs365.style.display="none";
	
	//hottest1.style.color="#999999";
	hottest7.style.color="#999999";	
	hottest31.style.color="red";
	//hottest365.style.color="#999999";
}else if(days==365){
	//hottestMsgs1.style.display="none";
	hottestMsgs7.style.display="none";	
	hottestMsgs31.style.display="none";
	//hottestMsgs365.style.display="";
	
	//hottest1.style.color="#999999";
	hottest7.style.color="#999999";	
	hottest31.style.color="#999999";
	//hottest365.style.color="red";

}
}

</script>

</head>

<body>


<table width=100% cellspacing=0 cellpadding=0
	style="border: 0px solid #d4d2d4; ">

	<tr >
		<td style="color:#808080;font-weight:bold;border-bottom:1px  solid #d2d4d2"><c:out value="${context.hottest_msgs }" />&nbsp;&nbsp;
			<a id=7 href="#"
			onclick="showHottestMsgs(7)">1 <c:out value='${context.week}' /></a>&nbsp;|&nbsp;<a
			id=31 href="#" onclick="showHottestMsgs(31)"> 1 <c:out
			value='${context.month}' /></a>&nbsp;<!-- |&nbsp;<a id=365 href="#"
			onclick="showHottestMsgs(365)">1 <c:out value='${context.year}' /></a> --></td>
	</tr>
	<tr>
		<td align=center width=100%>
		 
		<div id=hottestMsgs7 style="position: relative; width: 100%;">
		<table cellpadding=0 cellspacing=2 width=100% align=center   style="table-layout:fixed;">


			<c:forEach var="currentMsg" items="${hottestMsgs7}">
				<c:set var="platfromLabel"
					value='platform${groupMap[currentMsg[0]].open}' />
				<c:if
					test="${groupMap[currentMsg[0]].nav==1&&groupMap[currentMsg[0]].open==1}">
					<c:set var="platfromLabel" value='nav1' />
				</c:if>
				<c:if
					test="${groupMap[currentMsg[0]].nav==1&&groupMap[currentMsg[0]].open==2}">
					<c:set var="platfromLabel" value='nav2' />
				</c:if>
				<c:set var="encryptedUrl"
					value='encryptedUrl${groupMap[currentMsg[0]].open}' />
				<c:if test="${groupMap[currentMsg[0]].open==1}">
					<c:set var="viewer" value="newsView" />
					<c:set var="platform" value="news" />
				</c:if>
				<c:if test="${groupMap[currentMsg[0]].open==2}">
					<c:set var="viewer" value="communityView" />
					<c:set var="platform" value="community" />
				</c:if>
				<c:if test="${groupMap[currentMsg[0]].open==3}">
					<c:set var="viewer" value="bookmarksView" />
					<c:set var="platform" value="bookmarks" />
				</c:if>
				<c:if test="${groupMap[currentMsg[0]].open==4}">
					<c:set var="platform" value="reminders" />
				</c:if>
				<tr>
					<td  nowrap style="width:100%;overflow:hidden;border-bottom:0px dashed #d2d4d2"><a
						href="/group/<c:out value='${platform }'/><c:out value='${context.postfix }'/>">[<c:out
						value='${context[platfromLabel] }' />]</a><c:if
						test="${groupMap[currentMsg[0]].open!=4 }">
						<c:if test="${!context[encryptedUrl]}">
							<a style="font-size: 12px; color: #404040" 
								href="/group/<c:out value='${viewer }'/><c:out value='${context.postfix }'/>?gid=<c:out value='${groupMap[currentMsg[0]].id }'/>&tid=<c:out value='${currentMsg[1]}'/>"><c:out
								value='${groupMap[currentMsg[0]].name}' /></a>
						</c:if>
						<c:if test="${context[encryptedUrl]}">

							<c:set var='urlFragmentStr'
								value='?gid=${groupMap[currentMsg[0]].id}&tid=${ currentMsg[1]}' />
							<c:set var='urlFragment'
								value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
							<a style="font-size: 12px; color: #404040" 
								<c:if test="${not empty param.target}"> target=_top </c:if>
								href="/group/<c:out value='${viewer }'/><c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>">
							<c:out value='${groupMap[currentMsg[0]].name}' /></a>
						</c:if>
					</c:if> ~ <c:if test="${!(context[encryptedUrl])}">

						<a style="font-size: 12px; color: #404040" 
							href="/group/messagedetail<c:out value='${context.postfix }'/>?id=<c:out value='${currentMsg[0] }'/>"
							target=_blank><c:if
							test="${groupMap[currentMsg[0]].open==4 }">
							<c:set var='reminderDate' value='${currentMsg[0] }reminderDate' />
							<c:out value='${requestScope[reminderDate] }' />
						</c:if><c:if test="${currentMsg[7] >0 }">
							<font color=red>
						</c:if><c:out value='${currentMsg[2] }' /><c:if
							test="${currentMsg[7] >0 }">
							</font>
						</c:if> </a>
					</c:if> <c:if test="${context[encryptedUrl]}">
						<c:set var='urlFragmentStr' value='?id=${currentMsg[0]}' />
						<c:set var='urlFragment'
							value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
						<a <c:if test="${not empty param.target}"> target=_top </c:if> style="font-size: 12px; color: #404040" 
							href="/group/messagedetail<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:if
							test="${groupMap[currentMsg[0]].open==4 }">
							<c:set var='reminderDate' value='${currentMsg[0] }reminderDate' />
							<c:out value='${requestScope[reminderDate] }' />
						</c:if> <c:if test="${currentMsg[7] >0 }">
							<font color=red>
						</c:if><c:out value='${currentMsg[2] }' /><c:if
							test="${currentMsg[7] >0 }">
							</font>
						</c:if> </a>
					</c:if></td>
				</tr>
				<c:set var="rowCount" value="${rowCount+1 }" />
			</c:forEach>
		</table>
		</div>
		<!-- 
		<div id=hottestMsgs365
			style="position: relative; width: 100%; display: none">
		<table cellpadding=0 cellspacing=2 width=100% align=center  style="table-layout:fixed;" >


			<c:forEach var="currentMsg" items="${hottestMsgs365}">
				<c:set var="platfromLabel"
					value='platform${groupMap[currentMsg[0]].open}' />
				<c:if
					test="${groupMap[currentMsg[0]].nav==1&&groupMap[currentMsg[0]].open==1}">
					<c:set var="platfromLabel" value='nav1' />
				</c:if>
				<c:if
					test="${groupMap[currentMsg[0]].nav==1&&groupMap[currentMsg[0]].open==2}">
					<c:set var="platfromLabel" value='nav2' />
				</c:if>
				<c:set var="encryptedUrl"
					value='encryptedUrl${groupMap[currentMsg[0]].open}' />
				<c:if test="${groupMap[currentMsg[0]].open==1}">
					<c:set var="viewer" value="newsView" />
					<c:set var="platform" value="news" />
				</c:if>
				<c:if test="${groupMap[currentMsg[0]].open==2}">
					<c:set var="viewer" value="communityView" />
					<c:set var="platform" value="community" />
				</c:if>
				<c:if test="${groupMap[currentMsg[0]].open==3}">
					<c:set var="viewer" value="bookmarksView" />
					<c:set var="platform" value="bookmarks" />
				</c:if>
				<c:if test="${groupMap[currentMsg[0]].open==4}">
					<c:set var="platform" value="reminders" />
				</c:if>
				<tr>
					<td  nowrap style="width:100%;overflow:hidden;border-bottom:0px dashed #d2d4d2"><a style="font-size: 12px; color: #404040" 
						href="/group/<c:out value='${platform }'/><c:out value='${context.postfix }'/>">[<c:out
						value='${context[platfromLabel] }' />]</a><c:if
						test="${groupMap[currentMsg[0]].open!=4 }">
						<c:if test="${!context[encryptedUrl]}">
							<a style="font-size: 12px; color: #404040" 
								href="/group/<c:out value='${viewer }'/><c:out value='${context.postfix }'/>?gid=<c:out value='${groupMap[currentMsg[0]].id }'/>&tid=<c:out value='${currentMsg[1]}'/>"><c:out
								value='${groupMap[currentMsg[0]].name}' /></a>
						</c:if>
						<c:if test="${context[encryptedUrl]}">

							<c:set var='urlFragmentStr'
								value='?gid=${groupMap[currentMsg[0]].id}&tid=${ currentMsg[1]}' />
							<c:set var='urlFragment'
								value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
							<a style="font-size: 12px; color: #404040" 
								<c:if test="${not empty param.target}"> target=_top </c:if>
								href="/group/<c:out value='${viewer }'/><c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>">
							<c:out value='${groupMap[currentMsg[0]].name}' /></a>
						</c:if>
					</c:if> ~ <c:if test="${!(context[encryptedUrl])}">

						<a style="font-size: 12px; color: #404040" 
							href="/group/messagedetail<c:out value='${context.postfix }'/>?id=<c:out value='${currentMsg[0] }'/>"
							target=_blank><c:if
							test="${groupMap[currentMsg[0]].open==4 }">
							<c:set var='reminderDate' value='${currentMsg[0] }reminderDate' />
							<c:out value='${requestScope[reminderDate] }' />
						</c:if><c:if test="${currentMsg[7] >0 }">
							<font color=red>
						</c:if><c:out value='${currentMsg[2] }' /><c:if
							test="${currentMsg[7] >0 }">
							</font>
						</c:if> </a>
					</c:if> <c:if test="${context[encryptedUrl]}">
						<c:set var='urlFragmentStr' value='?id=${currentMsg[0]}' />
						<c:set var='urlFragment'
							value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
						<a <c:if test="${not empty param.target}"> target=_top </c:if> style="font-size: 12px; color: #404040" 
							href="/group/messagedetail<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:if
							test="${groupMap[currentMsg[0]].open==4 }">
							<c:set var='reminderDate' value='${currentMsg[0] }reminderDate' />
							<c:out value='${requestScope[reminderDate] }' />
						</c:if> <c:if test="${currentMsg[7] >0 }">
							<font color=red>
						</c:if><c:out value='${currentMsg[2] }' /><c:if
							test="${currentMsg[7] >0 }">
							</font>
						</c:if> </a>
					</c:if></td>
				</tr>
				<c:set var="rowCount" value="${rowCount+1 }" />
			</c:forEach>
		</table>
		</div> -->
		<div id=hottestMsgs31
			style="position: relative; width: 100%; display: none">
		<table cellpadding=0 cellspacing=2 width=100% align=center  style="table-layout:fixed;">


			<c:forEach var="currentMsg" items="${hottestMsgs31}">
				<c:set var="platfromLabel"
					value='platform${groupMap[currentMsg[0]].open}' />
				<c:if
					test="${groupMap[currentMsg[0]].nav==1&&groupMap[currentMsg[0]].open==1}">
					<c:set var="platfromLabel" value='nav1' />
				</c:if>
				<c:if
					test="${groupMap[currentMsg[0]].nav==1&&groupMap[currentMsg[0]].open==2}">
					<c:set var="platfromLabel" value='nav2' />
				</c:if>
				<c:set var="encryptedUrl"
					value='encryptedUrl${groupMap[currentMsg[0]].open}' />
				<c:if test="${groupMap[currentMsg[0]].open==1}">
					<c:set var="viewer" value="newsView" />
					<c:set var="platform" value="news" />
				</c:if>
				<c:if test="${groupMap[currentMsg[0]].open==2}">
					<c:set var="viewer" value="communityView" />
					<c:set var="platform" value="community" />
				</c:if>
				<c:if test="${groupMap[currentMsg[0]].open==3}">
					<c:set var="viewer" value="bookmarksView" />
					<c:set var="platform" value="bookmarks" />
				</c:if>
				<c:if test="${groupMap[currentMsg[0]].open==4}">
					<c:set var="platform" value="reminders" />
				</c:if>
				<tr> 
					<td  nowrap style="width:100%;overflow:hidden"><a style="font-size: 12px; color: #404040" 
						href="/group/<c:out value='${platform }'/><c:out value='${context.postfix }'/>">[<c:out
						value='${context[platfromLabel] }' />]</a><c:if
						test="${groupMap[currentMsg[0]].open!=4 }">
						<c:if test="${!context[encryptedUrl]}">
							<a style="font-size: 12px; color: #404040" 
								href="/group/<c:out value='${viewer }'/><c:out value='${context.postfix }'/>?gid=<c:out value='${groupMap[currentMsg[0]].id }'/>&tid=<c:out value='${currentMsg[1]}'/>"><c:out
								value='${groupMap[currentMsg[0]].name}' /></a>
						</c:if>
						<c:if test="${context[encryptedUrl]}">

							<c:set var='urlFragmentStr'
								value='?gid=${groupMap[currentMsg[0]].id}&tid=${ currentMsg[1]}' />
							<c:set var='urlFragment'
								value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
							<a style="font-size: 12px; color: #404040" 
								<c:if test="${not empty param.target}"> target=_top </c:if>
								href="/group/<c:out value='${viewer }'/><c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>">
							<c:out value='${groupMap[currentMsg[0]].name}' /></a>
						</c:if>
					</c:if> ~ <c:if test="${!(context[encryptedUrl])}">

						<a style="font-size: 12px; color: #404040" 
							href="/group/messagedetail<c:out value='${context.postfix }'/>?id=<c:out value='${currentMsg[0] }'/>"
							target=_blank><c:if
							test="${groupMap[currentMsg[0]].open==4 }">
							<c:set var='reminderDate' value='${currentMsg[0] }reminderDate' />
							<c:out value='${requestScope[reminderDate] }' />
						</c:if><c:if test="${currentMsg[7] >0 }">
							<font color=red>
						</c:if><c:out value='${currentMsg[2] }' /><c:if
							test="${currentMsg[7] >0 }">
							</font>
						</c:if> </a>
					</c:if> <c:if test="${context[encryptedUrl]}">
						<c:set var='urlFragmentStr' value='?id=${currentMsg[0]}' />
						<c:set var='urlFragment'
							value='${grouptalk:getEncryptedStr(urlFragmentStr)}' />
						<a <c:if test="${not empty param.target}"> target=_top </c:if> style="font-size: 12px; color: #404040" 
							href="/group/messagedetail<c:out value='${context.postfix }'/>/~<c:out value='${urlFragment}'/>"><c:if
							test="${groupMap[currentMsg[0]].open==4 }">
							<c:set var='reminderDate' value='${currentMsg[0] }reminderDate' />
							<c:out value='${requestScope[reminderDate] }' />
						</c:if> <c:if test="${currentMsg[7] >0 }">
							<font color=red>
						</c:if><c:out value='${currentMsg[2] }' /><c:if
							test="${currentMsg[7] >0 }">
							</font>
						</c:if> </a>
					</c:if></td>
				</tr>
				<c:set var="rowCount" value="${rowCount+1 }" />
			</c:forEach>
		</table>
		</div>
		</td>
	</tr>
</table>
<script>showHottestMsgs(7)</script>
</body>
</html>

